build/cups: remove checks for httpGetAuthString and http_t.authstring
authorChristoph Reiter <creiter@src.gnome.org>
Sat, 15 Jun 2019 07:42:17 +0000 (09:42 +0200)
committerChristoph Reiter <creiter@src.gnome.org>
Mon, 1 Jul 2019 19:34:44 +0000 (21:34 +0200)
httpGetAuthString() was added with cups 1.3 and we depend on a newer version
now. The direct field access was a fallback in case httpGetAuthString()
was missing, so this can also be dropped.

Ported to master from !938

config.h.meson
modules/printbackends/gtkcupsutils.c
modules/printbackends/meson.build

index c75fe7f784f34ad5d2e76f5c29ab5b8e48bec4bb..209b65d03c13af2d0bc42469d69ac1d25b841689 100644 (file)
 /* Define if GStreamer support is available */
 #mesondefine HAVE_GSTREAMER
 
-/* Define to 1 if you have the `httpGetAuthString' function. */
-#mesondefine HAVE_HTTPGETAUTHSTRING
-
-/* Define if cups http_t authstring field is accessible */
-#mesondefine HAVE_HTTP_AUTHSTRING
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #mesondefine HAVE_INTTYPES_H
 
index 8e7413a20a90a6a069a7a1d4dfb323436d8a325b..723923b10afba83346f2a225231567de79ee9c9d 100644 (file)
@@ -709,13 +709,7 @@ _post_send (GtkCupsRequest *request)
   httpClearFields (request->http);
   httpSetField (request->http, HTTP_FIELD_CONTENT_LENGTH, length);
   httpSetField (request->http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
-#ifdef HAVE_HTTPGETAUTHSTRING
   httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
-#else
-#ifdef HAVE_HTTP_AUTHSTRING
-  httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
-#endif
-#endif
 
   if (httpPost (request->http, request->resource))
     {
@@ -1198,13 +1192,7 @@ _get_send (GtkCupsRequest *request)
     }
 
   httpClearFields (request->http);
-#ifdef HAVE_HTTPGETAUTHSTRING
   httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
-#else
-#ifdef HAVE_HTTP_AUTHSTRING
-  httpSetField (request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
-#endif
-#endif
 
   if (httpGet (request->http, request->resource))
     {
index 8dee6f0a4da4abe99df0271e78ff795115c7c2c3..2946960d2e671402589157af99435500f4c3ff59 100644 (file)
@@ -26,19 +26,11 @@ if enable_cups
     cups_major_version = cc.compute_int('CUPS_VERSION_MAJOR', prefix : '#include <cups/cups.h>')
     cups_minor_version = cc.compute_int('CUPS_VERSION_MINOR', prefix : '#include <cups/cups.h>')
     message('Found CUPS version: @0@.@1@'.format(cups_major_version, cups_minor_version))
-    if cups_major_version >= 2
-      if cc.compiles('#include <cups/http.h> \n http_t http; char *s = http.authstring;')
-        cdata.set('HAVE_HTTP_AUTHSTRING', 1,
-          description :'Define if cups http_t authstring field is accessible')
-      endif
+    if cups_major_version < 2
+      cups_error = 'Need CUPS version >= 2.0'
+    else
       libcups = cc.find_library('cups', required : true)
-      if libcups.found() and cc.has_function('httpGetAuthString', dependencies : libcups)
-        cdata.set('HAVE_HTTPGETAUTHSTRING', 1)
-      endif
-
       print_backends += ['cups']
-    else
-      error('Need CUPS version >= 2.0')
     endif
   else
     error('Cannot find CUPS headers in default prefix.')